import request from '@/utils/request'

//创建设备升级任务
export function insertUpgrade(query) {
  return request({
    url: '/device/upgrade',
    method: 'post',
    data: query
  })
}

// 查询设备型号列表
export function listFirmwareUpdatePlan(query) {
  return request({
    url: '/device/upgrade/list',
    method: 'get',
    params: query
  })
}

export function cancelUpgrade(planId) {
  return request({
    url: '/device/upgrade/cancel/' + planId,
    method: 'put',
  })
}

